package router

import (
	"jgt-oper/src/context"
	"jgt-oper/src/web"

	"github.com/facebookgo/inject"
	"github.com/teambition/gear"
)

// WebEPMap 运营端企业-门禁管理 相关路由
func WebEPMap(g *inject.Graph, router *gear.Router) {
	a := new(web.EPController)
	err := g.Provide(&inject.Object{Value: a})
	if err != nil {
		panic(err)
	}

	router.Get("/enterprise-entrance/query-page", context.WrapContext(a.QueryPage))
	router.Get("/enterprise-entrance/:id", context.WrapContext(a.Get))
	router.Put("/enterprise-entrance/freeze-entrance", context.WrapContext(a.FreezeEntrance))
	router.Put("/enterprise-entrance/unfreeze-entrance", context.WrapContext(a.UnfreezeEntrance))
}
